import type { AppRouteModule } from '/@/router/types';

import { LAYOUT } from '/@/router/constant';
import { t } from '/@/hooks/web/useI18n';

import { RoleEnum } from '/@/enums/roleEnum';

const route: AppRouteModule = {
  path: '/coreSysData',
  name: 'CoreSysData',
  component: LAYOUT,
  redirect: '/coreSysData/coreDict',
  meta: {
    orderNo: 1001000,
    icon: 'ion:settings-outline',
    title: t('routes.cn.core.coreSysData.coreSysData'),
    roles: [RoleEnum.coreSysData],
  },
  children: [
    {
      path: 'coreDict',
      name: 'CoreDict',
      component: () => import('/@/views/cn/core/coreSysData/CoreDict.vue'),
      meta: {
        title: t('routes.cn.core.coreSysData.coreDict'),
        ignoreKeepAlive: true,
        roles: [RoleEnum.coreDict],
      },
    },
    {
      path: 'coreSysConf',
      name: 'CoreSysConf',
      component: () => import('/@/views/cn/core/coreSysData/CoreSysConf.vue'),
      meta: {
        title: t('routes.cn.core.coreSysData.coreSysConf'),
        ignoreKeepAlive: true,
        roles: [RoleEnum.coreSysConf],
      },
    },
    {
      path: 'coreDirs',
      name: 'CoreDirs',
      component: () => import('/@/views/cn/core/coreSysData/CoreDirs.vue'),
      meta: {
        title: t('routes.cn.core.coreSysData.coreDirs'),
        ignoreKeepAlive: true,
        roles: [RoleEnum.coreDirs],
      },
    },
    {
      path: 'coreMenu',
      name: 'CoreMenu',
      component: () => import('/@/views/cn/core/coreSysData/CoreMenu.vue'),
      meta: {
        title: t('routes.cn.core.coreSysData.coreMenu'),
        ignoreKeepAlive: true,
        roles: [RoleEnum.coreMenu],
      },
    },
    {
      path: 'coreRole',
      name: 'CoreRole',
      component: () => import('/@/views/cn/core/coreSysData/CoreRole.vue'),
      meta: {
        title: t('routes.cn.core.coreSysData.coreRole'),
        ignoreKeepAlive: true,
        roles: [RoleEnum.coreRole],
      },
    },
    {
      path: 'coreUsr',
      name: 'CoreUsr',
      component: () => import('/@/views/cn/core/coreSysData/CoreUsr.vue'),
      meta: {
        title: t('routes.cn.core.coreSysData.coreUsr'),
        ignoreKeepAlive: true,
        roles: [RoleEnum.coreUsr],
      },
    },
    {
      path: 'coreOrg',
      name: 'CoreOrg',
      component: () => import('/@/views/cn/core/coreSysData/CoreOrg.vue'),
      meta: {
        title: t('routes.cn.core.coreSysData.coreOrg'),
        ignoreKeepAlive: true,
        roles: [RoleEnum.coreOrg],
      },
    },
    {
      path: 'coreStaff',
      name: 'CoreStaff',
      component: () => import('/@/views/cn/core/coreSysData/CoreStaff.vue'),
      meta: {
        title: t('routes.cn.core.coreSysData.coreStaff'),
        ignoreKeepAlive: true,
        roles: [RoleEnum.coreStaff],
      },
    },
    {
      path: 'coreAccount',
      name: 'CoreAccount',
      component: () => import('/@/views/cn/core/coreSysData/CoreAccount.vue'),
      meta: {
        title: t('routes.cn.core.coreSysData.coreAccount'),
        ignoreKeepAlive: true,
        roles: [RoleEnum.coreAccount],
      },
    },
    {
      path: 'coreSessions',
      name: 'CoreSessions',
      component: () => import('/@/views/cn/core/coreSysData/CoreSessions.vue'),
      meta: {
        title: t('routes.cn.core.coreSysData.coreSessions'),
        ignoreKeepAlive: true,
        roles: [RoleEnum.coreSessions],
      },
    },
    {
      path: 'coreLoginLog',
      name: 'CoreLoginLog',
      component: () => import('/@/views/cn/core/coreSysData/CoreLoginLog.vue'),
      meta: {
        title: t('routes.cn.core.coreSysData.coreLoginLog'),
        ignoreKeepAlive: true,
        roles: [RoleEnum.coreLoginLog],
      },
    },
    {
      path: 'coreWorkflow',
      name: 'CoreWorkflow',
      component: () => import('/@/views/cn/core/coreSysData/CoreWorkflow.vue'),
      meta: {
        title: t('routes.cn.core.coreSysData.coreWorkflow'),
        ignoreKeepAlive: true,
        roles: [RoleEnum.coreWorkflow],
      },
    },
    {
      path: 'coreCron',
      name: 'CoreCron',
      component: () => import('/@/views/cn/core/coreSysData/CoreCron.vue'),
      meta: {
        title: t('routes.cn.core.coreSysData.coreCron'),
        ignoreKeepAlive: true,
        roles: [RoleEnum.coreCron],
      },
    },
    {
      path: 'coreDbTable',
      name: 'CoreDbTable',
      component: () => import('/@/views/cn/core/coreSysData/CoreDbTable.vue'),
      meta: {
        title: t('routes.cn.core.coreSysData.coreDbTable'),
        ignoreKeepAlive: true,
        roles: [RoleEnum.coreDbTable],
      },
    },
  ],
};

export default route;
